package com.palm.core.util;

import org.noear.solon.core.util.DateAnalyzer;

import java.text.ParseException;
import java.util.Date;

/**
 * 扩展Date格式
 */
public class EasyDateAnalyzer extends DateAnalyzer {
    public Date parse(String val) throws ParseException {
        Date d=super.parse(val);
        if(d==null){
            if(val.matches("^\\d+$")){
                return new Date(Long.valueOf(val));
            }
        }
        return d;
    }
}
